package com.gupaoedu.pattern.strategy;



/**
 * 2019/9/28
 * created by chenpp
 *  1.航班自己取消 退还全额
 *  2.行程变更，客户取消 退还90%
 *  3.未赶上航班  退还30%
 */
public class FlightReturnTest {
    public static void main(String[] args) {
        Strategy strategy = StrategyContext.getStrategy(StrategyContext.NOT_ARRIVAL_AT_TIME);
        FlightReturn flightReturn = strategy.flightReturn(1389.00);
        System.out.println(flightReturn.getResult());
        Strategy strategy1 = StrategyContext.getStrategy(StrategyContext.FLIGHT_CALCEL);
        FlightReturn flightReturn1 = strategy1.flightReturn(1389.00);
        System.out.println(flightReturn1.getResult());

    }
}
